import org.newdawn.slick.UnicodeFont;
import org.newdawn.slick.font.effects.ColorEffect;

public class Text {

	String fontPath;
	String txt;
	UnicodeFont uFont;

	int x, y;

	public Text(String fontName) {
		fontPath = "res/" + fontName + ".ttf";
		txt = "Hello, World!";
		x = 0;
		y = 0;
	}

	public void LoadFont() {
		try {
			uFont = new UnicodeFont(fontPath, 20, false, false); // Create
																	// Instance
			uFont.addAsciiGlyphs(); // Add Glyphs
			uFont.addGlyphs(400, 600); // Add Glyphs
			uFont.addGlyphs(1000, 1100); // Cyrillic glyphs are somethere here
			uFont.getEffects().add(new ColorEffect(java.awt.Color.WHITE)); // Add
																			// Effects
			uFont.loadGlyphs(); // Load Glyphs
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

	public void ChangeText(String newText) {
		txt = newText;
	}

	public void ChangePosition(int newX, int newY) {
		x = newX;
		y = newY;
	}

	public void Draw() {
		uFont.drawString(x, y, txt);
	}

}
